package com.qf.qfcenterservice.api;

import com.qf.common.bean.R;
import com.qf.common.feigns.DeviceTypeApi;
import com.qf.common.model.QfDeviceType;
import com.qf.qfcenterservice.service.DeviceTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class DeviceTypeFeignApi implements DeviceTypeApi {

    @Autowired
    private DeviceTypeService deviceTypeService;

    @GetMapping("/api/device-type/all")
    @Override
    public R all() {

        List<QfDeviceType> deviceTypes = deviceTypeService.list();

        return R.ok(deviceTypes);
    }
}
